package cn.steam.foo.ctrl;

import cn.steam.foo.api.LockApi;
import cn.steam.foo.util.CommonUtil;
import cn.steam.foo.util.lock.KLock;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author zhang jintao on 2022/05/19
 **/
@RestController
public class LockCtrl implements LockApi {


    @Override
    @KLock(key = "#key")
    public String fuck(String key) {
        System.out.println("收到调用：" + key);
        CommonUtil.sleep(2000);
        return "fuck";
    }

}
